Delete Method (Messages Collection) 

The Delete method deletes all the messages in the Messages collection.

Syntax

objMsgColl.Delete()

Parameters

objMsgColl

Required. The Messages collection object.

 

Remarks

The Delete method moves the deleted messages to the Deleted Items folder, if the user has enabled this option. If the option is not enabled, or if the messages are already in the Deleted Items folder, the Delete method permanently deletes them, and they cannot be recovered.

Be cautious using the Delete method with a collection, since it deletes all the collection s member objects. To delete only one MessageC062VO object, use the Delete._GJYW method specific to that object.

The Delete method on a large collection takes effect immediately and is permanent. Any object once deleted cannot be recovered.

For example, this code fragment deletes all of the messages in a folder:

objFolder.Messages.Delete

 

See Also

Add Method (Messages Collection)F5G68T